package com.ys.openapi.organization.entity;

import com.alibaba.fastjson.JSON;

import java.text.SimpleDateFormat;
import java.util.*;

/**
 * 云枢部门对象
 */
public class DepartmentEntity {
   /* {"parentId":"2c2c80867a1f88d8017a58572f9309fd","name":"测试1222","deptType":"YUNS_DEPT",
            "queryCode": "1_1#CP210717444444444444",
            "sourceid":"CP210717444444444444",
            "corpId": "main",
            "leaf": true,
            "scopeModel":{"deptVisibleType":"ALL_VISIBLE","deptVisibleScope":"[]","staffVisibleType":"ALL_VISIBLE",
            "staffVisibleScope":"[]"}}*/
     private String name;
     private String deptType;
     private String parentId;
     private String queryCode;
     private String sourceid;
     private String corpId;
     private boolean leaf;
     private String id;
     private boolean deleted;

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    private Map<String,String> scopeModel;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Map<String, String> getScopeModel() {
        return scopeModel;
    }

    public void setScopeModel(Map<String, String> scopeModel) {
        this.scopeModel = scopeModel;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDeptType() {
        return deptType;
    }

    public void setDeptType(String deptType) {
        this.deptType = deptType;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getQueryCode() {
        return queryCode;
    }

    public void setQueryCode(String queryCode) {
        this.queryCode = queryCode;
    }

    public String getSourceid() {
        return sourceid;
    }

    public void setSourceid(String sourceid) {
        this.sourceid = sourceid;
    }

    public String getCorpId() {
        return corpId;
    }

    public void setCorpId(String corpId) {
        this.corpId = corpId;
    }

    public boolean isLeaf() {
        return leaf;
    }

    public void setLeaf(boolean leaf) {
        this.leaf = leaf;
    }



    public static void main(String[] args) {
         /* {"parentId":"2c2c80867a1f88d8017a58572f9309fd","name":"测试1222","deptType":"YUNS_DEPT",
            "queryCode": "1_1#CP210717444444444444",
            "sourceid":"CP210717444444444444",
            "corpId": "main",
            "leaf": true,
            "scopeModel":{"deptVisibleType":"ALL_VISIBLE","deptVisibleScope":"[]","staffVisibleType":"ALL_VISIBLE",
            "staffVisibleScope":"[]"}}*/
        DepartmentEntity de=new DepartmentEntity();
        de.setCorpId("main");
        de.setDeptType("YUNS_DEPT");
        de.setLeaf(true);
        de.setName("测试王王王五");
        de.setParentId("2c2c80867a1f88d8017a58572f9309fd");
        de.setQueryCode("1_1#CP210717444444444444#CP29348528358");
        de.setSourceid("CP29348528358");
        Map<String, String> map=new HashMap<>();
        map.put("deptVisibleType","ALL_VISIBLE");
        map.put("staffVisibleType","ALL_VISIBLE");
        map.put("deptVisibleScope",new ArrayList<>().toString());
        map.put("staffVisibleScope",new ArrayList<>().toString());

        String s = JSON.toJSONString(de);
        System.out.println(s);

        SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddHHmmss");
        System.out.println("CP"+sdf.format(new Date())+Calendar.getInstance().get(Calendar.MILLISECOND));

       // System.out.println(""+Calendar.getInstance().get(Calendar.YEAR)+Calendar.MONTH+Calendar.DATE+Calendar.HOUR+Calendar.SECOND+Calendar.MINUTE+Calendar.MILLISECOND);
    }
}

